From 4d1a14149cf357d78cb2e31b636ed742c5b07f12 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 2 May 2008 09:39:48 +0000 Subject: [PATCH] [HAVE_CARBON && HAVE_AVAILABILITYMACROS_H]: Include AvailabilityMacros.h. (USE_MAC_IMAGE_IO, LIBS_IMAGE) [HAVE_CARBON]: New defines. (LIBS_CARBON) [HAVE_CARBON]: Use LIBS_IMAGE. --- src/s/darwin.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/s/darwin.h b/src/s/darwin.h index ba784805ea7..2017bd2e6cf 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -262,9 +262,31 @@ Boston, MA 02110-1301, USA. */ /* Indicate that we are compiling for Mac OS X. */ #define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX +#ifdef HAVE_CARBON + +#ifdef HAVE_AVAILABILITYMACROS_H +#include +#endif + +/* Whether to use the Image I/O framework for reading images. */ +#ifndef USE_MAC_IMAGE_IO +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1040 || MAC_OS_X_VERSION_MIN_REQUIRED < 1020) +#define USE_MAC_IMAGE_IO 1 +#endif +#endif + +/* If the Image I/O framework is not used, fall back on QuickTime. */ +#if USE_MAC_IMAGE_IO +#define LIBS_IMAGE +#else +#define LIBS_IMAGE -framework QuickTime +#endif + +#endif /* HAVE_CARBON */ + /* Link in the Carbon lib. */ #ifdef HAVE_CARBON -#define LIBS_CARBON -framework Carbon -framework QuickTime +#define LIBS_CARBON -framework Carbon LIBS_IMAGE #else #define LIBS_CARBON #endif -- 2.30.2